package com.haizhi.crm.sys.message.concurrent;

/**
 * Created by wangshan on 2018/5/21.
 */
public class ActionSupplier<Req, Resp> {

    private Req req;

    private Resp resp;


    private ProcessService<Req, Resp> processService;

    public ActionSupplier(ProcessService<Req, Resp> processService, Req req) {
        this.processService = processService;
        this.req = req;
    }

    public Resp execute() {
        Resp resp = this.processService.execute(this.req);
        return resp;
    }
}
